﻿;; read
(def! READ (fn* [str]
  str))

;; eval
(def! EVAL (fn* [ast]
  ast))

;; print
(def! PRINT (fn* [exp] exp))

;; repl
(def! rep (fn* [str]
  (PRINT (EVAL (READ str)))))

;; repl loop
(def! repl-loop (fn* [line]
  (if line
    (do
      (if (not (= "" line))
        (println (rep line)))
      (repl-loop (readline "lisp-user> "))))))

;; main
(repl-loop "")